﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="_s.aspx.cs" Inherits="ZF.WS.Admin.Char._s" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="/css/common.css" rel="stylesheet" type="text/css" />
    <link href="/css/default.css1" rel="stylesheet" type="text/css" />

    <script src="/js/jQuery.js" type="text/javascript"></script>

    <script src="js/jquery-1.4.2.js" type="text/javascript"></script>

    <script src="/js/calendar.js" type="text/javascript"></script>

    <script src="/js/index.js" type="text/javascript"></script>

    <script src="/js/jqPlugins/jquery.json-2.2.min.js" type="text/javascript"></script>

    <script src="/js/char.js" type="text/javascript"></script>
    

    <link href="/css/char.css" rel="stylesheet" type="text/css" />
    
    <style>
        
        * { margin: 0px; padding: 0px; font-size: 12px; list-style: none; font-family: 宋体,arial,verdana,sans-serif,fantasy,tahoma; }
    </style>
    <%-- <script>
        $(function() {
            SlideInit();
        });
        function SlideInit() {
            $(".board").each(function() {
                var board = this;
                $(board).find("dt a.slide").click(function() {

                    $(board).find("dd.slide").hide();

                    $(board).find("a.slide").removeClass("active");
                    $("." + $(this).attr("bind")).show();
                    $(this).addClass("active");
                });
            });
        }
    </script>
    <script>
        function _refTxt() {
            window.parent._refTxt(RoomKey);
        }
    </script>--%>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div>
            <link href="/fckeditor/_samples/sample.css" rel="stylesheet" type="text/css" />

            <script type="text/javascript" src="/fckeditor/fckeditor.js"></script>

            <style>
                #br { height: 330px; margin-bottom: 5px; background: #fafafa; border: 1px solid #BCDDF4; overflow: scroll; }
                #br dl { margin-bottom: 5px; border-bottom: 1px solid #eee; margin-left: 5px; }
                #br dl dt { text-align: left; }
                #br dl dt.dt1 { color: #008040; }
                #br dl dt.dt2 { color: #44B8FB; }
                #br dl dd { margin-left: 10px; margin-top: 5px; text-align: left; }
                #br dl dd img { margin: 1px; }
                #br dl dd.sys { color: #f00; font-size: 14px; }
            </style>
             
            <div id="br">
            </div>
 
            <script type="text/javascript">
                var sBasePath = "/fckeditor/"
                var oFCKeditor = new FCKeditor('FCKeditor1');
                oFCKeditor.BasePath = sBasePath;
                oFCKeditor.ToolbarSet = 'Chat';
                oFCKeditor.Value = '';
                oFCKeditor.Height = "100px";
                oFCKeditor.Create();
               
       
            </script>
 
              

            <div class="tar_ pr10_ mb10_">
                <span class=" fl_"><span class=" fl_">
                    <input type="radio" name="qjj" class="qjj" id="qjj1" checked="checked" /><label for="qjj1">Enter发送</label>
                    <input type="radio" name="qjj" class="qjj" id="qjj2" /><label for="qjj2">Ctrl+S发送</label>
                    <input type="radio" name="qjj" class="qjj" id="qjj3" /><label for="qjj3">Ctrl+Enter发送</label>
                </span><span class=" fr_">
                    <input type="button" id="send" value=" 发 送 " class="linkbtn" />
                    <input type="button" id="clear" value=" 清 空 "  class="linkbtn"/>&nbsp; </span>

                    <script>
                        var guid = "<%=this.myguid %>";
                        var myguid = "<%=this.myguid %>";
                        var osguid = "<%=this.osguid %>";
                        var asmxPage = "/ServiceChar.asmx"
                    </script>

                    <script>
                        function __send(msg) {
                            $("#br").append(String.format("<dl><dt class='dt1'>你说：</dt><dd>{0}</dd></dl>", msg));
                            var data = $.toJSON({ myGuid: myguid, msg: msg, osGuid: osguid });
                            ajax(data, "SendMsg", function(msg) {
                                msg = $.evalJSON($.evalJSON(msg).d);
                                if (msg != null && !msg.result) {
                                    $("#br").append(String.format("<dl><dd class='sys'>系统消息：{0}</dd></dl>", msg.msg));
                                }
                            });
                            _setDivScrollTop();
                        }
                        function __rec() {
                            if (!recOpen)
                                return;
                            var data = $.toJSON({ myGuid: myguid, osGuid: osguid });
                            var rcount = 0;
                            ajax(data, "RecMsg", function(msg) {
                                msg = $.evalJSON($.evalJSON(msg).d);

                                $(msg).each(function() {
                                    var m = this;
                                    $("#br").append(String.format("<dl><dt class='dt2'>{0}说：</dt><dd>{1}</dd></dl>", m.sender, m.msg));
                                    window.top._Reced(m.sender);
                                });
                            });
                            _setDivScrollTop();
                            
                        }
                        var recOpen = true;
                        function __OpenRec() { recOpen = true; }
                        function __StopRec() { recOpen = false; }
                        $(function() {
                            setInterval("__rec()", 3000);

                        });
                    </script>

               
            </div>
        </div>
        
    </div>
    </form>
</body>
</html>
